package com.dz.order.feign;

import com.dz.common.base.ResponseBase;
import com.dz.order.feign.entity.Sku;
import com.dz.order.feign.entity.Spu;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;


@FeignClient("buduncle-goods")
public interface GoodsFeignService {

    @GetMapping(value = "/goods/sku/get_by_id",consumes = "application/json")
    @ResponseBody
    ResponseBase<Sku> getSkuById(@RequestParam("skuId")Long skuId) throws Exception;

    @GetMapping(value = "/goods/spu/get_by_id",consumes = "application/json")
    @ResponseBody
    ResponseBase<Spu> getSpuById(@RequestParam("spuId") Long spuId) throws Exception;
}
